CustomerOmsStoreAdd

插入用户标记

一次可以插入多条记录,单次最多500条

请求地址

POST
http://OmsAddress/app/newoms.php/webservice/customer-oms-store/add?cmd=10019&ip-type=webservicerest&access-token=AccessTokenVal

POST请求参数说明

参数 格式 是否必填 说明
app_id 整型 业务ID
key_binary 字符串
value_binary 字符串
version 整型

app_id,key_binary是唯一键

Data参数

使用json格式表示记录相关信息,示例如下:

{
    "app_id": 2,
    "markdata": [
        {
            "app_id": 2,
            "key_binary": "keyword1",
            "value_binary": "some string",
            "version": "some string"
        },
        {
            "app_id": 2,
            "key_binary": "keyword2",
            "value_binary": "some string",
            "version": "some string"
        }
    ]
}

返回语法

请求示例

通过 curl 方法发起请求

命令中的参数请参考本页中的“POST请求参数说明”,access-token的获取方法详见:获取access-token

curl -H "Content-type: application/json" -X "POST" -d '{
    "app_id": 2,
    "markdata": [
        {
            "app_id": 2,
            "key_binary": "keyword1",
            "value_binary": "some string",
            "version": "some string"
        },
        {
            "app_id": 2,
            "key_binary": "keyword2",
            "value_binary": "some string",
            "version": "some string"
        }
    ]
}' http://omsaddress/app/newoms.php/webservice/customer-oms-store/add?cmd=10019&ip-type=webservicerest&access-token=<access-token>

返回示例

成功返回示例

http请求的Status=200

{
    "code": 0,
    "data": 2,
    "msg": "insert success"
}

错误返回

http请求的Status!=200

{
    "name": "Unauthorized",
    "message": "You are requesting with an invalid credential.",
    "code": 0,
    "status": 401,
    "type": "yii\\web UnauthorizedHttpException"
}
{
    "source_ip": "ip:10.29.89.51 not in whitelist"
}

results matching ""

    No results matching ""